package net.lahuobao.mall.entity.admin;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.*;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**   
 * @Title: Entity
 * @Description: B2C订单
 * @author zhangdaihao
 * @date 2016-12-28 10:16:10
 * @version V1.0   
 *
 */
@Entity
@Table(name = "mall_order_b2c", schema = "lahuobao")
@DynamicUpdate(true)
@DynamicInsert(true)
@SuppressWarnings("serial")
public class MallOrderB2cEntity implements java.io.Serializable {
	/**id*/
	private java.lang.Integer id;
	/**orderid*/
	private java.lang.Integer orderid;
	/**mobilephone*/
	private java.lang.String mobilephone;
	/**consigneename*/
	private java.lang.String consigneename;
	/**areacode*/
	private java.lang.String areacode;
	/**detailaddress*/
	private java.lang.String detailaddress;
	/**freight*/
	private BigDecimal freight;
	/**confirmtype*/
	private java.lang.Integer confirmtype;
	/**isdelayconfirm*/
	private java.lang.Integer isdelayconfirm;
	/**confirmtime*/
	private java.util.Date confirmtime;
	/**orderstatus*/
	private java.lang.Integer orderstatus;

	private String areacodeStr;

	private String orderStatusName;
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  id
	 */
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name ="ID",nullable=false,precision=10,scale=0)
	public java.lang.Integer getId(){
		return this.id;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  id
	 */
	public void setId(java.lang.Integer id){
		this.id = id;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  orderid
	 */
	@Column(name ="ORDERID",nullable=false,precision=10,scale=0)
	public java.lang.Integer getOrderid(){
		return this.orderid;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  orderid
	 */
	public void setOrderid(java.lang.Integer orderid){
		this.orderid = orderid;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  mobilephone
	 */
	@Column(name ="MOBILEPHONE",nullable=true,length=12)
	public java.lang.String getMobilephone(){
		return this.mobilephone;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  mobilephone
	 */
	public void setMobilephone(java.lang.String mobilephone){
		this.mobilephone = mobilephone;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  consigneename
	 */
	@Column(name ="CONSIGNEENAME",nullable=false,length=50)
	public java.lang.String getConsigneename(){
		return this.consigneename;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  consigneename
	 */
	public void setConsigneename(java.lang.String consigneename){
		this.consigneename = consigneename;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  areacode
	 */
	@Column(name ="AREACODE",nullable=false,length=10)
	public java.lang.String getAreacode(){
		return this.areacode;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  areacode
	 */
	public void setAreacode(java.lang.String areacode){
		this.areacode = areacode;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  detailaddress
	 */
	@Column(name ="DETAILADDRESS",nullable=false,length=50)
	public java.lang.String getDetailaddress(){
		return this.detailaddress;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  detailaddress
	 */
	public void setDetailaddress(java.lang.String detailaddress){
		this.detailaddress = detailaddress;
	}
	/**
	 *方法: 取得BigDecimal
	 *@return: BigDecimal  freight
	 */
	@Column(name ="FREIGHT",nullable=false,precision=18,scale=2)
	public BigDecimal getFreight(){
		return this.freight;
	}

	/**
	 *方法: 设置BigDecimal
	 *@param: BigDecimal  freight
	 */
	public void setFreight(BigDecimal freight){
		this.freight = freight;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  confirmtype
	 */
	@Column(name ="CONFIRMTYPE",nullable=true,precision=10,scale=0)
	public java.lang.Integer getConfirmtype(){
		return this.confirmtype;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  confirmtype
	 */
	public void setConfirmtype(java.lang.Integer confirmtype){
		this.confirmtype = confirmtype;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  isdelayconfirm
	 */
	@Column(name ="ISDELAYCONFIRM",nullable=false,precision=3,scale=0)
	public java.lang.Integer getIsdelayconfirm(){
		return this.isdelayconfirm;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  isdelayconfirm
	 */
	public void setIsdelayconfirm(java.lang.Integer isdelayconfirm){
		this.isdelayconfirm = isdelayconfirm;
	}
	/**
	 *方法: 取得java.util.Date
	 *@return: java.util.Date  confirmtime
	 */
	@Column(name ="CONFIRMTIME",nullable=true)
	public java.util.Date getConfirmtime(){
		return this.confirmtime;
	}

	/**
	 *方法: 设置java.util.Date
	 *@param: java.util.Date  confirmtime
	 */
	public void setConfirmtime(java.util.Date confirmtime){
		this.confirmtime = confirmtime;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  orderstatus
	 */
	@Column(name ="ORDERSTATUS",nullable=false,precision=10,scale=0)
	public java.lang.Integer getOrderstatus(){
		return this.orderstatus;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  orderstatus
	 */
	public void setOrderstatus(java.lang.Integer orderstatus){
		this.orderstatus = orderstatus;
	}

	@Transient
	public String getAreacodeStr() {
		return areacodeStr;
	}

	public void setAreacodeStr(String areacodeStr) {
		this.areacodeStr = areacodeStr;
	}

	@Transient
	public String getOrderStatusName() {
		String str = "";
		switch (this.orderstatus){
			case 1:
				str = "等待付款";
				break;
			case 2:
				str = "已支付";
				break;
			case 3:
				str = "已发货";
				break;
			case 4:
				str = "退款中";
				break;
			case 5:
				str = "交易完成";
				break;
			case 6:
				str = "已结算";
				break;
			case 99:
				str = "交易关闭";
				break;
			case 98:
				str = "支付未完成";
				break;
		}
		return str;
	}

	public void setOrderStatusName(String orderStatusName) {
		this.orderStatusName = orderStatusName;
	}
}
